1. Field of the Invention
The present invention relates to storage control technology.
2. Description of the Related Art
A storage system that can be connected to an external device, such as a host device and another storage system, is known. A storage system comprises a plurality of media drives (e.g. hard disk drives), for example, and a logical unit (hereafter LU) is provided by these plurality of media drives. The storage system can receive a write command from an external device, and write the data to an LU (also called a logical volume) according to the write command, or receive a read command from an external device, read the data from the LU and send it to the external device according to the read command. When data is written to an LU, some storage may attach a check code, for detecting whether the data is valid or not, to the data, and detect the validity of the data by checking the check code attached to the data when the data is read, so as to improve the reliability of the data. (In this description, this check code is called the “data assurance code” for convenience.) Examples of a data assurance code are LRC (Longitudinal Redundancy Check) which is a logical operation value, and a code comprised of the LU number be the data storage destination and a part (insignificant 2 bytes) of the logical block address (LBA) (hereafter this code is called an LA (Logical Address) for convenience).
In the case of this type of storage system, the data on the media drive and the data assurance code must be matched in advance before using an LU. In other words, formatting is necessary in advance. Otherwise when the data assurance code is checked, the data and the data assurance code may become inconsistent, and the data may be regarded as invalid.
Generally in formatting, data (such as value “0”) must be written in the entire storage area of the media drive, but recently drive capacities are increasing and a lengthy time required for formatting is becoming a problem.
Also a technology called “quick formatting” (e.g. Japanese patent Application Laid-Open No. 2003-241904) is known. In quick formatting, formatting is executed in the background. In this case, the storage system manages the formatted area and the unformatted area, and when an access command, specifying a certain area (read command or write command), is received from an external device, the access command is processed if the formatted area is specified. If an unformatted area is specified, however, the storage system formats the specified area first before processing the access command, and after this formatting completes, the access command is processed.
In general formatting, data must be written in the entire area of the LU to be used to match the data on the drive and the data assurance code. LU creation and formatting may be performed at the factory, before shipping the storage system, so that the storage system can be used immediately after shipment. However recently as drive capacities increase and as storage system capacities (that is, the number of media drives to be installed) increase, formatting takes a long time, and the lengthy shipment related work is becoming a problem.
Also a storage system generally has a RAID (Redundant Array of Independent Inexpensive Disks), which features a redundancy in the case of drive failure. If a drive failure beyond redundancy occurs, the failed drive is replaced, and the LU using the drive after replacement is reformatted, then the data is loaded from such an external backup device as a tape device to restore the data. In such a case, urgent recovery is required, and the so called quick formatting may be used so that the data can be restored from the external backup device quickly. However even in quick formatting, formatting is performed in the background, so the performance of the storage system drops dramatically until quick formatting completely ends (e.g. it takes time to process an access command received from an external device).